-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce RetryAttribute
for test methods
#4586
Conversation
src/TestFramework/TestFramework/Attributes/TestMethod/RetryAttribute.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Attributes/TestMethod/RetryAttribute.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Attributes/TestMethod/RetryAttribute.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Attributes/TestMethod/RetryAttribute.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Attributes/TestMethod/RetryAttribute.cs
Outdated
Show resolved
Hide resolved
FYI From previous talks with Playwright where they have good retries, that imho were attempted to be duplicated in mstest.playwright, Max also mentioned that they wanted:
|
Not sure what shape would you be expecting. Currently, every application of the attribute is specifying the number of retries
This is currently info specific to the test method itself and is irrelevant to assembly initialize. I think you are talking of a completely different design that allows a "global" retry count, not a Retry attribute on test methods which I'm implementing here.
We are going to have a design that allows that, but that is unlikely to be implemented in this PR though, unfortunately. We need to know better how to communicate that information to tools that will make use of it. |
aeccb48
to
077b03b
Compare
077b03b
to
c45c457
Compare
d831540
to
bf06a3c
Compare
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs
Outdated
Show resolved
Hide resolved
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs
Outdated
Show resolved
Hide resolved
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Attributes/TestMethod/RetryBaseAttribute.cs
Outdated
Show resolved
Hide resolved
src/TestFramework/TestFramework/Attributes/TestMethod/RetryContext.cs
Outdated
Show resolved
Hide resolved
// This is a public API, so we can't change it to be async. | ||
// Consider not using this API internally, and introduce an async version, and mark this as obsolete. | ||
ExecuteTestsAsync(tests, runContext, frameworkHandle, isDeploymentDone).GetAwaiter().GetResult(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I need to address that in a follow-up
Fixes #3161